package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 宿舍
 * </p>
 *
 * @author hpiggy
 * @since 2025-03-02
 */
@Data
@TableName("dorm_room")
@ApiModel(value = "DormRoom对象", description = "宿舍")
public class DormRoom implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("宿舍编号")
    private Integer roomNum;

    @ApiModelProperty("宿舍名称")
    private String name;

    @ApiModelProperty("房东姓名")
    private String landlordName;

    @ApiModelProperty("房东电话")
    private String landlordPhone;

    @ApiModelProperty("1正常")
    private Integer status;

    @ApiModelProperty("区域id")
    private Long areaId;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("0女，1男")
    private Integer sexType;

    @ApiModelProperty("宿舍长")
    private Long managerId;

    @ApiModelProperty("床位数量")
    private Integer berth;

    @ApiModelProperty("合同签订时间")
    private LocalDate pactStartDateTime;

    @ApiModelProperty("合同到期时间")
    private LocalDate pactEndDateTime;

    @ApiModelProperty("租金")
    private BigDecimal rentPrice;

    @ApiModelProperty("租期")
    private Integer rentPhase;

    @ApiModelProperty("创建人")
    private Long createdId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(exist = false)
    @ApiModelProperty("宿舍长")
    private String staffName;

    @TableField(exist = false)
    @ApiModelProperty("区域名")
    private String areaName;

    @TableField(exist = false)
    @ApiModelProperty("床位已住数量")
    private Integer liveCount;

    @TableField(exist = false)
    @ApiModelProperty("床位剩余数量")
    private Integer notLiveCount;

    @TableField(exist = false)
    @ApiModelProperty("是否到期")
    private String due;

    @TableField(exist = false)
    @ApiModelProperty("0正常 1快到期 2已到期")
    private Integer dueStatus;

}
